<?php
extract ($data);
$span_class = (isset($selectedCategoryID) && $Categories['id'] == $selectedCategoryID ) ? 'active' : 'off';
//$tree->addItemAttribute('class', $span_class); // highlight this li
echo $this->Html->link($Categories['name'], array('plugin'=>false,'controller'=>$this->params['controller'],'action' => 'index', $Categories['id'],Inflector::slug($Categories['name'],'-')),array('escape'=>false,'class'=>$span_class));
?>
